import React, { FC, useEffect } from 'react';

interface IProps {
  setIsRefresh: Function;
}
const Child: FC<IProps> = ({ setIsRefresh }) => {
  useEffect(() => {
    console.log('我是child');
  }, []);

  const handlerClick = () => {
    setIsRefresh({});
  };

  return (
    <>
      <button onClick={handlerClick}>点击我</button>
    </>
  );
};

export default React.memo(Child);
